const team = require("../../database/team");

module.exports = async (req, res, next)=>{
  const {tId, tName} = req.query;

  // 配置查询条件：根据接收到的字段，决定查询哪些数据
  const where = {};
  if(tId) where.tId = tId;
  if(tName) where.tName = tName;

  const data = await team.find( where, {_id:0, __v:0});
  res.send({
    code: 1,
    msg:  "查询成功",
    data
  })
}